Optimal. Leaf size=64 \[ -\frac{a \cot ^3(e+f x)}{3 f}-\frac{a \cot (e+f x)}{f}-\frac{b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac{b \cot (e+f x) \csc (e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.050834, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {2748, 3767, 3768, 3770} \[ -\frac{a \cot ^3(e+f x)}{3 f}-\frac{a \cot (e+f x)}{f}-\frac{b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac{b \cot (e+f x) \csc (e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2748
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx &=a \int \csc ^4(e+f x) \, dx+b \int \csc ^3(e+f x) \, dx\\ &=-\frac{b \cot (e+f x) \csc (e+f x)}{2 f}+\frac{1}{2} b \int \csc (e+f x) \, dx-\frac{a \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (e+f x)\right )}{f}\\ &=-\frac{b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac{a \cot (e+f x)}{f}-\frac{a \cot ^3(e+f x)}{3 f}-\frac{b \cot (e+f x) \csc (e+f x)}{2 f}\\ \end{align*}
Mathematica [A] time = 0.0272745, size = 115, normalized size = 1.8 \[ -\frac{2 a \cot (e+f x)}{3 f}-\frac{a \cot (e+f x) \csc ^2(e+f x)}{3 f}-\frac{b \csc ^2\left (\frac{1}{2} (e+f x)\right )}{8 f}+\frac{b \sec ^2\left (\frac{1}{2} (e+f x)\right )}{8 f}+\frac{b \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )}{2 f}-\frac{b \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.084, size = 74, normalized size = 1.2 \begin{align*} -{\frac{2\,\cot \left ( fx+e \right ) a}{3\,f}}-{\frac{\cot \left ( fx+e \right ) a \left ( \csc \left ( fx+e \right ) \right ) ^{2}}{3\,f}}-{\frac{b\cot \left ( fx+e \right ) \csc \left ( fx+e \right ) }{2\,f}}+{\frac{b\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{2\,f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.72575, size = 99, normalized size = 1.55 \begin{align*} \frac{3 \, b{\left (\frac{2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac{4 \,{\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a}{\tan \left (f x + e\right )^{3}}}{12 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.01722, size = 344, normalized size = 5.38 \begin{align*} -\frac{8 \, a \cos \left (f x + e\right )^{3} - 6 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \,{\left (b \cos \left (f x + e\right )^{2} - b\right )} \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) - 3 \,{\left (b \cos \left (f x + e\right )^{2} - b\right )} \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) - 12 \, a \cos \left (f x + e\right )}{12 \,{\left (f \cos \left (f x + e\right )^{2} - f\right )} \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 2.33545, size = 165, normalized size = 2.58 \begin{align*} \frac{a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 3 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 12 \, b \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) + 9 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \frac{22 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 9 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 3 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + a}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3}}}{24 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]